package no18.javaio;

import java.io.IOException;
import java.io.StringReader;

/**
 * 从内在中读取数据
 * 
 * @author gao
 * 
 */
public class MemoryInput {
	private final static String FILE_NAME = "D:/work/project/complex/complex.thinkinjava/src/main/java/no18/javaio/test.txt";

	public static void main(String[] args) throws IOException {
		//StringReader  字符流
		StringReader in = new StringReader(BufferedInputFile.read(FILE_NAME));
		int c;
		while ((c = in.read()) != -1) {
			// 不要使用println
			System.out.print((char) c);
		}
		in.close();
	}
}
